from pyecharts.charts import Bar
from pyecharts import options
sal=[7000,6000,5000,4000]
city=["南昌","北京","上海","成都"]
bar=Bar()
bar.add_xaxis(city)
bar.add_yaxis("月薪/元",sal)
bar.set_global_opts(title_opts= options.TitleOpts (title="各城市平均薪水图"))
bar.render("baravg.html")